"""
添加线索页面
"""
from selenium.webdriver.common.by import By
from page.base_page import BasePage
class AddCluesPage(BasePage):
    #元素定位器
    #联系人姓名
    xs_add_lxrxm_locator = (By.CSS_SELECTOR, "#contacts_name")
    #手机
    xs_add_sj_locator = (By.ID, "mobile")
    #邮箱
    xs_add_yx_locator = (By.ID, "email")
    #职位
    xs_add_zw_locator = (By.ID, "position")
    #保存
    xs_add_bc_locator = (By.CSS_SELECTOR, "#form1 > table > tfoot > tr > td > input:nth-child(1)")


    #输入联系人姓名
    def input_lxrxm(self,lxrxm):
        self.driver.find_element(*self.xs_add_lxrxm_locator).send_keys(lxrxm)

    #输入手机
    def input_sj(self,sj):
        self.driver.find_element(*self.xs_add_sj_locator).send_keys(sj)

    #输入邮箱
    def input_yx(self,yx):
        self.driver.find_element(*self.xs_add_yx_locator).send_keys(yx)

    #输入职位
    def input_zw(self,zw):
        self.driver.find_element(*self.xs_add_zw_locator).send_keys(zw)

    #点击保存
    def click_bc(self):
        self.driver.find_element(*self.xs_add_bc_locator).click()
